IP.Board Requirements Checker
You are running PHP {$version}";
//-----------------------------------------
// Check for zend guard
//-----------------------------------------
$hasZend = false;
$hasIoncube = false;
if ( function_exists( 'zend_loader_enabled' ) )
{
if ( @zend_loader_enabled() === true )
{
$hasZend = true;
}
}
if ( extension_loaded( 'ionCube Loader' ) )
{
$hasIoncube = true;
}
flushOutput( "IP.Nexus Only: Checking for ability to load Zend Guard encoded files...", $hasZend, "Not able to run the Zend encoded files for IP.Nexus." );
flushOutput( "IP.Nexus Only: Checking for ability to load Ioncube encoded files...", $hasIoncube, "Not able to run the Ioncube encoded files for IP.Nexus." );
flushOutput( "IP.Nexus Only: Can run IP.Nexus...", $hasZend or $hasIoncube, "Not able to run either Ioncube or Zend Encoded IP.Nexus files. You can still use IP.Board, IP.Downloads. IP.Blog, IP.Gallery, IP.Content, IP.Chat" );
//-----------------------------------------
// Memory limit
//-----------------------------------------
$_memLimit = null;
$_recLimit = 128;
if( @ini_get('memory_limit') )
{
$_memLimit = @ini_get('memory_limit');
}
if( $_memLimit )
{
$_intLimit = $_memLimit;
$_intRec = $_recLimit * 1024 * 1024;
preg_match( "#^(\d+)(\w+)$#", strtolower($_intLimit), $match );
if( $match[2] == 'g' )
{
$_intLimit = intval( $_intLimit ) * 1024 * 1024 * 1024;
}
else if ( $match[2] == 'm' )
{
$_intLimit = intval( $_intLimit ) * 1024 * 1024;
}
else if ( $match[2] == 'k' )
{
$_intLimit = intval( $_intLimit ) * 1024;
}
else
{
$_intLimit = intval( $_intLimit );
}
if( $_intLimit >= $_intRec )
{
flushOutput( "Checking memory limit ({$_recLimit}M or better recommended)...", true, "Your memory limit: {$_memLimit}" );
}
else
{
flushOutput( "Checking memory limit ({$_recLimit}M or better recommended)...", 2, "Your memory limit: {$_memLimit}. You can still proceed but we recommend you contact your host and request the memory limit be raised to {$_recLimit}M to prevent possible issues." );
}
}
else
{
flushOutput( "Checking memory limit ({$_recLimit}M or better recommended)...", 2, "Could not determine your memory limit" );
}
//-----------------------------------------
// Checking for SPL
//-----------------------------------------
$splExists = in_array( 'SPL', $extensions );
flushOutput( "Checking for SPL...", $splExists, "The PHP SPL extension is required for IP.Board " . IPB_VERSION . ". Please ask your host to install the SPL library." );
//-----------------------------------------
// Checking for DOM XML
//-----------------------------------------
$domXML = in_array( 'dom', $extensions );
flushOutput( "Checking for DOM XML Handling...", $domXML, "The DOM XML Handling extension is required for IP.Board " . IPB_VERSION . ". Please ask your host to install the libxml2 library." );
//-----------------------------------------
// Check for GD2
//-----------------------------------------
$gd2 = in_array( 'gd', $extensions );
flushOutput( "Checking for GD library...", $gd2, "The GD2 library is required for IP.Board " . IPB_VERSION . ". Please ask your host to install the libgd library." );
if( function_exists( 'gd_info' ) )
{
$gdInfo = gd_info();
$fail = true;
if( $gdInfo["GD Version"] )
{
preg_match( "/.*?([\d\.]+).*?/", $gdInfo["GD Version"], $matches );
if( $matches[1] )
{
$compareVersions = version_compare( '2.0', $matches[1], '<=' );
if( !$compareVersions )
{
$fail = 2;
}
}
}
flushOutput( "Checking for GD2...", $fail, "While the GD library is installed, GD library version 2 is required for IP.Board " . IPB_VERSION . ". The version reported (if at all) by your server is '{$gdInfo['GD Version']}'. Please verify you are running GD version 2, and upgrade the libgd library if necessary." );
}
//-----------------------------------------
// Checking for mysql extension
//-----------------------------------------
$mysql = in_array( 'mysql', $extensions );
$mysqli = in_array( 'mysqli', $extensions );
flushOutput( "Checking for mysql support...", ( $mysql OR $mysqli ), "Your server does not appear to have a mysql library available, please ask your host to install the mysqli extension." );
if( $mysql AND !$mysqli )
{
flushOutput( "Checking for mysqli support...", false, "The mysqli extension is preferred over the original mysql extension. This is not a requirement, but if possible we recommend you to install the mysqli extension for better performance." );
}
//-----------------------------------------
// Checking for JSON
//-----------------------------------------
$json = in_array( 'json', $extensions );
flushOutput( "Checking for JSON...", $json, "While not required, the PHP JSON extension is recommended. The JSON extensions provides for improved efficiency in handling some functionality in IP.Board. If possible, we recommend you to install the json extension." );
//-----------------------------------------
// Checking for openSSL
//-----------------------------------------
$openssl = in_array( 'openssl', $extensions ) ? true : 2;
flushOutput( "Checking for openSSL...", $openssl, "OpenSSL is required for some Facebook, Twitter, and Subscription Manager functionality. If you do not use any of these modules, you do not need this module, otherwise we recommend you to install the openssl extension." );
//-----------------------------------------
// Suhosin
//-----------------------------------------
if( extension_loaded( 'suhosin' ) )
{
$_postMaxVars = @ini_get('suhosin.post.max_vars');
$_reqMaxVars = @ini_get('suhosin.request.max_vars');
$_getMaxLen = @ini_get('suhosin.get.max_value_length');
$_postMaxLen = @ini_get('suhosin.post.max_value_length');
$_reqMaxLen = @ini_get('suhosin.request.max_value_length');
$_reqMaxVar = @ini_get('suhosin.request.max_varname_length');
$_indPMV = $_postMaxVars < 4096 ? 2 : true;
$_indRMV = $_reqMaxVars < 4096 ? 2 : true;
$_indGML = $_getMaxLen < 2000 ? 2 : true;
$_indPML = $_postMaxLen < 1000000 ? 2 : true;
$_indRML = $_reqMaxLen < 1000000 ? 2 : true;
$_indRMVL = $_reqMaxVar < 350 ? 2 : true;
flushOutput( "suhosin.post.max_vars (4096 or better recommended)...", $_indPMV, "Your value: {$_postMaxVars}. Can prevent some forms (especially in the ACP) from saving properly." );
flushOutput( "suhosin.request.max_vars (4096 or better recommended)...", $_indRMV, "Your value: {$_reqMaxVars}. Can prevent some forms (especially in the ACP) from saving properly." );
flushOutput( "suhosin.get.max_value_length (2000 or better recommended)...", $_indGML, "Your value: {$_postMaxLen}. Can prevent very long URLs from loading correctly." );
flushOutput( "suhosin.post.max_value_length (1000000 or better recommended)...", $_indPML, "Your value: {$_postMaxLen}. Can prevent very large posts or other form submissions from saving properly." );
flushOutput( "suhosin.request.max_value_length (1000000 or better recommended)...", $_indRML, "Your value: {$_reqMaxLen}. Can prevent very large posts or other form submissions from saving properly." );
flushOutput( "suhosin.request.max_varname_length (350 or better recommended)...", $_indRMVL, "Your value: {$_reqMaxVar}. Can prevent long friendly URLs from loading correctly." );
}
//-----------------------------------------
// Flush output function
//-----------------------------------------
function flushOutput( $checking, $result, $errorText )
{
print "" . $checking;
if( $result === 2 )
{
print "WARNING
{$errorText}";
}
else if( !$result )
{
print "FAIL
{$errorText}";
}
else
{
print "Pass";
}
print "
";
flush();
ob_flush();
return true;
}
?>
Please also remember that MySQL 4.1 or higher (MySQL 5.0 or higher preferred) is required for IP.Board . Ask your server administrator to check the version of MySQL on your server if you are unsure.